package com.itlong.cloud.project.sdk;

import com.itlong.cloud.POJO.DTO.sdk.*;
import com.itlong.cloud.POJO.DTO.sdk.sendPush.SendPushMessageDTO;
import com.itlong.cloud.POJO.VO.sdk.*;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <desc>
 *      SDK项目服务层暴露接口
 * </desc>
 *
 * @createDate 2019/11/7
 */
@FeignClient(name = "project-service")
public interface ISDKServerProjectServiceClient {

    /**
     * <desc>
     *     获取项目的楼栋信息列表
     * </desc>
     *
     * @param dto 查询参数
     * @return 楼栋信息列表
     * @author Juguang.S
     * @createDate 2019/11/7
     */
    @PostMapping(path = "/SDK/server/getBuildList")
    Page<SDKProjectBuildInfoVO> getBuildList(@RequestBody CloudDeviceSDKDTO dto) throws Exception;

    /**
     * <desc>
     *     获取项目楼栋的单元信息列表
     * </desc>
     *
     * @param dto 查询参数
     * @return 楼栋信息列表
     * @author Juguang.S
     * @createDate 2019/11/7
     */
    @PostMapping(path = "/SDK/server/getUnitList")
    Page<SDKProjectUnitInfoVO> getUnitList(@RequestBody CloudDeviceSDKDTO dto) throws Exception;

    /**
     * <desc>
     *     获取项目房间信息列表
     * </desc>
     *
     * @param dto 查询参数
     * @return 楼栋信息列表
     * @author Juguang.S
     * @createDate 2019/11/8
     */
    @PostMapping(path = "/SDK/server/getRoomList")
    Page<SDKProjectRoomInfoVO> getRoomList(@RequestBody CloudDeviceSDKDTO dto) throws Exception;

    /**
     * <desc>
     *     获取项目的通行记录列表
     * </desc>
     *
     * @param dto 查询参数
     * @return 通行记录信息列表
     * @author Juguang.S
     * @createDate 2019/11/11
     */
    @PostMapping(path = "/SDK/server/getPassRecordByPage")
    Page<SDKEquipRecordGetVO> getPassRecordByPage(@RequestBody CloudDeviceSDKDTO dto) throws Exception;

    /**
     * <desc>
     *     删除时间段通行记录
     * </desc>
     *
     * @param dto 查询参数
     * @return 通行记录信息列表
     * @author Qiang.S
     * @createDate 2020/07/02
     */
    @PostMapping(path = "/SDK/server/deleteRecordByDate")
    Integer deleteRecordByDate(@RequestBody CloudDeviceSDKDTO dto) throws Exception;




    /**
     *<desc>
     * 查询第三方消息回调地址
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-23 11:08
     * @Param
     * @Return
     * @Exception
     *
     */
    @GetMapping(path = "/SDK/server/getSendMessgeUrl")
    Integer getSendMessgeUrl(@RequestParam("type") String type,@RequestParam("newVersion") double newVersion) throws Exception;


    /**
     *<desc>
     * 修改第三方对接接口的版本号
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-23 11:09
     * @Param SendPushMessageDTO
     * @Return
     * @Exception
     *
     */
    @PostMapping(path = "/SDK/server/updateSDKApiVersion")
    Integer updateSDKApiVersion(@RequestBody SendPushMessageDTO dto) throws Exception;

}
